/*
 * mmc_spi.c
 *
 * Created: 05.04.2013 17:35:29
 *  Author: saenko
 */ 


#include <avr/io.h>

#include "spi.h"

int main(void)
{
	
	spi_init_master();
	
	wait_74_cycles();
	
	choice_card();
	
	CMD0();
	
	CMD1();
		CMD1();
			CMD1();
				CMD1();
					CMD1();
						CMD1();

	CMD1();
		CMD1();
			CMD1();
			
							CMD1();
	
	write_card();
	
/*	CMD8();

	ACMD41();
	*/	
    while(1)
    {
        //TODO:: Please write your application code 
    }
}